home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / typinfo.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  5.6 KB  |  194 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'TypInfo.pas' rev: 3.00
  6.  
  7. #ifndef TypInfoHPP
  8. #define TypInfoHPP
  9. #include <SysUtils.hpp>
  10. #include <SysInit.hpp>
  11. #include <System.hpp>
  12.  
  13. //-- user supplied -----------------------------------------------------------
  14. namespace Typinfo
  15. {
  16.   enum TParamFlag {pfVar, pfConst, pfArray, pfAddress, pfReference, pfOut};
  17.   enum TIntfFlag {ifHasGuid, ifDispInterface, ifDispatch};
  18.   typedef SetBase<TParamFlag, pfVar, pfOut> TParamFlagsBase;
  19.   typedef SetBase<TIntfFlag, ifHasGuid, ifDispatch> TIntfFlagsBase;
  20. }
  21.  
  22. namespace Typinfo
  23. {
  24. //-- type declarations -------------------------------------------------------
  25. enum TTypeKind { tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod, 
  26.     tkWChar, tkLString, tkWString, tkVariant, tkArray, tkRecord, tkInterface };
  27.  
  28. typedef Set<TTypeKind, tkUnknown, tkInterface>  TTypeKinds;
  29.  
  30. enum TOrdType { otSByte, otUByte, otSWord, otUWord, otSLong };
  31.  
  32. enum TFloatType { ftSingle, ftDouble, ftExtended, ftComp, ftCurr };
  33.  
  34. enum TMethodKind { mkProcedure, mkFunction, mkSafeProcedure, mkSafeFunction };
  35.  
  36. typedef Set<TParamFlag, pfVar, pfOut>  TParamFlags;
  37.  
  38. typedef Set<TIntfFlag, ifHasGuid, ifDispatch>  TIntfFlags;
  39.  
  40. struct TTypeInfo;
  41. typedef TTypeInfo *PTypeInfo;
  42.  
  43. typedef PTypeInfo *PPTypeInfo;
  44.  
  45. #pragma pack(push, 1)
  46. struct TTypeInfo
  47. {
  48.     TTypeKind Kind;
  49.     System::ShortString Name;
  50. } ;
  51. #pragma pack(pop)
  52.  
  53. struct TTypeData;
  54. typedef TTypeData *PTypeData;
  55.  
  56. #pragma pack(push, 1)
  57. struct TTypeData
  58. {
  59.     
  60.     union
  61.     {
  62.         struct 
  63.         {
  64.             PTypeInfo *IntfParent;
  65.             TIntfFlagsBase IntfFlags;
  66.             GUID Guid;
  67.             ShortStringBase IntfUnit;
  68.             
  69.         };
  70.         struct 
  71.         {
  72.             TMethodKind MethodKind;
  73.             Byte ParamCount;
  74.             char ParamList[1024];
  75.             
  76.         };
  77.         struct 
  78.         {
  79.             System::TMetaClass*ClassType;
  80.             PTypeInfo *ParentInfo;
  81.             short PropCount;
  82.             ShortStringBase UnitName;
  83.             
  84.         };
  85.         Byte MaxLength;
  86.         TFloatType FloatType;
  87.         TOrdType OrdType;
  88.         union
  89.         {
  90.             PTypeInfo *CompType;
  91.             struct 
  92.             {
  93.                 int MinValue;
  94.                 int MaxValue;
  95.                 union
  96.                 {
  97.                     struct 
  98.                     {
  99.                         PTypeInfo *BaseType;
  100.                         ShortStringBase NameList;
  101.                         
  102.                     };
  103.                     
  104.                 };
  105.             };
  106.             
  107.         };
  108.     };
  109. } ;
  110. #pragma pack(pop)
  111.  
  112. #pragma pack(push, 1)
  113. struct TypInfo__1
  114. {
  115.     
  116. } ;
  117. #pragma pack(pop)
  118.  
  119. #pragma pack(push, 1)
  120. struct TPropData
  121. {
  122.     Word PropCount;
  123.     TypInfo__1 PropList;
  124. } ;
  125. #pragma pack(pop)
  126.  
  127. struct TPropInfo;
  128. typedef TPropInfo *PPropInfo;
  129.  
  130. #pragma pack(push, 1)
  131. struct TPropInfo
  132. {
  133.     PTypeInfo *PropType;
  134.     void *GetProc;
  135.     void *SetProc;
  136.     void *StoredProc;
  137.     int Index;
  138.     int Default;
  139.     short NameIndex;
  140.     System::ShortString Name;
  141. } ;
  142. #pragma pack(pop)
  143.  
  144. typedef void __fastcall (__closure *TPropInfoProc)(PPropInfo PropInfo);
  145.  
  146. typedef TPropInfo *TPropList[16380];
  147.  
  148. typedef TPropList *PPropList;
  149.  
  150. //-- var, const, procedure ---------------------------------------------------
  151. #define tkAny (System::Set<TTypeKind, tkUnknown, tkInterface> () << tkUnknown << tkInteger << tkChar \
  152.     << tkEnumeration << tkFloat << tkString << tkSet << tkClass << tkMethod << tkWChar << tkLString << tkWString \
  153.     << tkVariant << tkArray << tkRecord << tkInterface )
  154. #define tkMethods (System::Set<TTypeKind, tkUnknown, tkInterface> () << tkUnknown )
  155. #define tkProperties (System::Set<TTypeKind, tkUnknown, tkInterface> () << tkInteger << tkChar << tkEnumeration \
  156.     << tkFloat << tkString << tkSet << tkClass << tkWChar << tkLString << tkWString << tkVariant << tkArray \
  157.     << tkRecord << tkInterface )
  158. extern PACKAGE System::AnsiString BooleanIdents[2];
  159. extern PACKAGE System::AnsiString DotSep;
  160. extern PACKAGE PTypeData __fastcall GetTypeData(PTypeInfo TypeInfo);
  161. extern PACKAGE System::AnsiString __fastcall GetEnumName(PTypeInfo TypeInfo, int Value);
  162. extern PACKAGE int __fastcall GetEnumValue(PTypeInfo TypeInfo, const System::AnsiString Name);
  163. extern PACKAGE PPropInfo __fastcall GetPropInfo(PTypeInfo TypeInfo, const System::AnsiString PropName
  164.     );
  165. extern PACKAGE void __fastcall GetPropInfos(PTypeInfo TypeInfo, PPropList PropList);
  166. extern PACKAGE int __fastcall GetPropList(PTypeInfo TypeInfo, TTypeKinds TypeKinds, PPropList PropList
  167.     );
  168. extern PACKAGE bool __fastcall IsStoredProp(System::TObject* Instance, PPropInfo PropInfo);
  169. extern PACKAGE int __fastcall GetOrdProp(System::TObject* Instance, PPropInfo PropInfo);
  170. extern PACKAGE void __fastcall SetOrdProp(System::TObject* Instance, PPropInfo PropInfo, int Value);
  171.     
  172. extern PACKAGE System::AnsiString __fastcall GetStrProp(System::TObject* Instance, PPropInfo PropInfo
  173.     );
  174. extern PACKAGE void __fastcall SetStrProp(System::TObject* Instance, PPropInfo PropInfo, const System::AnsiString 
  175.     Value);
  176. extern PACKAGE Extended __fastcall GetFloatProp(System::TObject* Instance, PPropInfo PropInfo);
  177. extern PACKAGE void __fastcall SetFloatProp(System::TObject* Instance, PPropInfo PropInfo, Extended 
  178.     Value);
  179. extern PACKAGE System::Variant __fastcall GetVariantProp(System::TObject* Instance, PPropInfo PropInfo
  180.     );
  181. extern PACKAGE void __fastcall SetVariantProp(System::TObject* Instance, PPropInfo PropInfo, const System::Variant 
  182.     &Value);
  183. extern PACKAGE Sysutils::TMethod __fastcall GetMethodProp(System::TObject* Instance, PPropInfo PropInfo
  184.     );
  185. extern PACKAGE void __fastcall SetMethodProp(System::TObject* Instance, PPropInfo PropInfo, const Sysutils::TMethod 
  186.     &Value);
  187.  
  188. }    /* namespace Typinfo */
  189. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  190. using namespace Typinfo;
  191. #endif
  192. //-- end unit ----------------------------------------------------------------
  193. #endif    // TypInfo
  194.